package com.woniuxy.ticketmovie.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author movie
 * @since 2021-02-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Ticket_movie implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @NotBlank(message = "名称不能为空")
    @Length(min = 1,max = 10,message = "名称应该在{min}-{max}之间")
    private String name;
    @NotBlank(message = "作者名称不能为空")
    private String director;
    @NotBlank(message = "演员名称不能为空")
    private String actor;

    private String description;
    @NotBlank(message = "海报吐血不能为空")
    private String stills;
    @NotBlank(message = "预告片不能为空")
    private String trailer;
    @NotBlank(message = "评分不能为空")
    @Range(min = 0,max = 5,message = "分数应该在{min}-{max}之间")
    private BigDecimal score;


}
